#include "avlTree.h"
#include "RB_Tree.h"
#include <cmath>
#include <iostream>
using namespace std;

int main(int argc, char* argv[])
{
    AVLTree tree;
    RBTree rbTree;
    int numbers[] = { 21,5,7,1,23,
                                18,17,34,12,35,
                                46,23,3,11,9,
                              1,0,44,47,32,
                              11,24,10,19,13,
                              2765,34,52,44,46,
                              28,36,1,50,47,
                              56,21,24,27,13,
                              66,14,17,16,8,
                              45,12,78,7102,1000,
                              -56,-45,-75,-12,-7584,
                              28,18,38,109,25,
                              71,45,74,15,6,
                              12,8,90,12,23,
                              18,77,66,74,34,
                              42,57,32,41,78,
                              45,59,0,200 };
    int arraySize = sizeof(numbers)/sizeof(int);
  
    for( int i=0; i<arraySize; i++)
    {
        rbTree.insert(numbers[i]  );
       // tree.insert(numbers[i]);
      /*  if( !tree.balanced() )
        {
            cout<<i<<endl;
        }*/
    }
    //tree.outPutTreeToFile("tree.txt");
   // if( tree.balanced() )
    //{
    //    cout<<"success\n";
    //    tree.showNumbers();
  //  }
   // else
  //  {
    //    cout<<"wrong\n";
   // }
    
    getchar();
    return 0;
}

